package com.bytedance.news.common.service.manager.ext

import com.bytedance.news.common.service.manager.IService
import com.bytedance.news.common.service.manager.ServiceManager
import kotlin.reflect.KClass

/**
 * @author shiguangyin
 * @date 2019/3/13
 */

/**
 * kotlin 扩展方法
 */
fun <T: IService> getService(clazz : Class<T>): T? {
    return ServiceManager.getService(clazz)
}


fun <T: IService> KClass<T>.impl(): T? {
    return ServiceManager.getService(this.java)
}

